<template>
  <div id="app">
    <div id="nav">
      <router-link to="/">Home</router-link> |
      <router-link to="/about">About</router-link> |
      <router-link to="/button">Button</router-link> |
      <router-link to="/checkbox">Checkbox</router-link> |
      <router-link to="/layout">layout</router-link> |
      <router-link to="/textOverflow">文本溢出</router-link> |
      <router-link to="/attr">$attr</router-link> |
      <router-link to="/undefined">未匹配路由</router-link> |
      <router-link to="/deploy">deploy</router-link> |
      <router-link to="/suspense">异步组件</router-link>  |
      <router-link to="/loadingBtn">加载中button</router-link> | 
      <router-link to="/sse">sse请求</router-link> | 
      <router-link to="/recorder">录音</router-link> |
      <router-link to="/theme-switch">主题切换</router-link>
    </div>
    <router-view />
  </div>
</template>

<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  background-color: var(--el-bg-color);
  color: var(--el-text-color-primary);
  transition: all 0.3s ease;
}

#nav {
  padding: 30px;
  background-color: var(--el-card-bg-color);
  border-bottom: 1px solid var(--el-border-color);
  transition: all 0.3s ease;

  a {
    font-weight: bold;
    color: var(--el-text-color-primary);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;

    &:hover {
      color: var(--el-color-primary);
    }

    &.router-link-exact-active {
      color: var(--el-color-primary);
    }
  }
}

/* 深色模式样式 */
:root.dark #app {
  background-color: #1a1a1a;
}

:root.dark #nav {
  background-color: #2c2c2c;
  border-bottom-color: #333333;
}

/* 浅色模式样式 */
:root.light #app {
  background-color: #f5f5f5;
}

:root.light #nav {
  background-color: #ffffff;
  border-bottom-color: #dcdfe6;
}
</style>
